package cn.edu.neu.lab603.cloudeval.strategy.policy

import cn.edu.neu.lab603.cloudeval.entity.{PhysicalMachine => Host, VirtualMachine => VM}

/** 实现静态阈值的物理服务器选择策略。
  *
  * Created by yfwz100 on 2016/11/9.
  */
class HostSelectionPolicyStaticThreshold(val overloadPct: Double,
                                         val capacityFactor: Double = 1)
  extends HostSelectionPolicyUtilizationBase(capacityFactor) {

  override def isOverloadHost(host: Host): Boolean = host.getUsedResPct("mips") >= overloadPct

  override def toString = "Thr"
}
